using SqlSugar;
using System;

namespace B.S.XZYData.Domain.LJC
{
    /// <summary>
    /// 生产计划明细
    /// </summary>
    [SugarTable("plan_item")]
    public class PlanItemModel
    {
        /// <summary>
        /// 主键 ID
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 所属计划 ID
        /// </summary>
        [SugarColumn(ColumnName = "plan_id", IsNullable = false)]
        public int PlanId { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [SugarColumn(ColumnName = "pr_code", Length = 30, IsNullable = false)]
        public string ProductCode { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [SugarColumn(ColumnName = "pr_name", Length = 100, IsNullable = false)]
        public string ProductName { get; set; }

        /// <summary>
        /// 规格
        /// </summary>
        [SugarColumn(ColumnName = "spec", Length = 100)]
        public string? Spec { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        [SugarColumn(ColumnName = "qty", IsNullable = false)]
        public int Quantity { get; set; }

        /// <summary>
        /// 完成数量
        /// </summary>
        [SugarColumn(ColumnName = "done")]
        public int? DoneQuantity { get; set; }

        /// <summary>
        /// 对应工单编号
        /// </summary>
        [SugarColumn(ColumnName = "wo_code", Length = 30)]
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "c_tm")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "u_tm")]
        public DateTime? UpdateTime { get; set; }
    }
} 